package xyz.robinbingo.rbtask.common.mp;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.baomidou.mybatisplus.extension.injector.methods.LogicDeleteByIdWithFill;

import java.util.List;

/**
 * CustomSqlInjector
 *
 * @author Robin
 * @date 2021/7/17 19:01
 **/
public class CustomSqlInjector extends DefaultSqlInjector {

    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
        List<AbstractMethod> methodList = super.getMethodList(mapperClass,tableInfo);
        methodList.add(new LogicDeleteByIdWithFill());
        methodList.add(new LogicDeleteByWrapperWithFill());
        methodList.add(new LogicDeleteByIdsWithFill());
        return methodList;
    }
}
